﻿@model DeviceFinder.Models.DeviceModel

@{
    ViewBag.Title = "Edit Device";
}

@{Html.RenderPartial("../Shared/UserCPLeftMenu");}

<h2>Edit Device</h2>


@using (Html.BeginForm("DeviceChangeSettings", "User", FormMethod.Post))
{
    if (ViewData["Result"] != null)
    {
        if (ViewData["Result"].ToString().ToLower().Contains("success"))
        {        
            <p id="result" style="color:Green">@ViewData["Result"]</p>
        }
        else
        {            
            <p id="result" style="color:Red">@ViewData["Result"]</p>
        }
    }
    
    <fieldset>
        <legend>Change Password Form</legend>
        <ol>
            <li>
                @Html.LabelFor(m => m.Name)
                @Html.TextBoxFor(m => m.Name)
                @Html.ValidationMessageFor(m => m.Name)
            </li>
            <li>
                @Html.LabelFor(m => m.Type)
                @Html.TextBoxFor(m => m.Type)
                @Html.ValidationMessageFor(m => m.Type)
            </li>
            <li>
                @Html.LabelFor(m => m.HomePage)
                @Html.TextBoxFor(m => m.HomePage)
                @Html.ValidationMessageFor(m => m.HomePage)
            </li>
            <li>
                @Html.LabelFor(m => m.WebcamCapture)
                @Html.TextBoxFor(m => m.WebcamCapture)
                @Html.ValidationMessageFor(m => m.WebcamCapture)
            </li>
            <li>
                @Html.LabelFor(m => m.IsFollow)
                @Html.CheckBoxFor(m => m.IsFollow)
                @Html.ValidationMessageFor(m => m.Type)
            </li>
             <li>
                @Html.LabelFor(m => m.IsActiveCommand)
                @Html.CheckBoxFor(m => m.IsActiveCommand)
                @Html.ValidationMessageFor(m => m.IsActiveCommand)
            </li>
             <li>
                @Html.LabelFor(m => m.Description)
                @Html.TextBoxFor(m => m.Description)
            </li>
        </ol>
        <input id="submitbtn" type="image" src="../../Images/edit butt.png" alt="Submit Button"/>        
        <script type="text/javascript">
            $("#submitbtn").click(function () {
                $("#result").html(" ");
            });
        </script>
    </fieldset>
    
    <input type="hidden" id="EmailUser" name="EmailUser" value="@Model.EmailUser"/>
}